﻿@using MvcDemo.Control;

@{
    ViewBag.Title = "Index";
}
<script src="@Url.Content("~/Content/flexigrid/flexigrid.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/flexigrid/css/flexigrid/flexigrid.css")"   rel="stylesheet" type="text/css" />
<h2>
    Index</h2>
<div>
    @Html.HilandTextBox()
    <div id="customers" style="display: none">
    </div>
    <script type="text/javascript">
        $("#customers").flexigrid({
            url: '/Json/CustomersList',
            dataType: 'json',
            colModel: [
             { display: 'ID', name: 'CustomerID', width: 40,
                 sortable: true, align: 'left'
             },
             { display: 'Company', name: 'CompanyName', width: 100,
                 sortable: true, align: 'left'
             }
            ],
            searchitems: [
                { display: 'Company', name: 'CompanyName' }
                ],
            sortname: 'CustomerID',
            sortorder: 'asc',
            usepager: true,
            title: 'Customers',
            useRp: true,
            rp: 15,
            showTableToggleBtn: true,
            width: 1040,
            height: 380
        });
    </script>
</div>
